import request from '@/utils/request'
// 获取部门列表
export const getDepartmentList=()=>{
  return request.get('/company/department')
}


// 获取部门负责人列表
export const getDepartmentManager=()=>{
  return request.get('/sys/user/simple')
}

// 新增部门
export const addDepartment=(data)=>{
  return request.post('/company/department',data)
}

// 获取部门详细
export const getDepartmentDetail=(id)=>{
  return request.get(`/company/department/${id}`)
}

// 删除部门
export const deleteDepartment=(id)=>{
  return request.delete(`/company/department/${id}`)
}


// 修改部门
export const updateDepartment=(id,data)=>{
  return request.put(`/company/department/${id}`,data)
}